-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: group commit files into batches #398
Conversation
* @param {string} message the message of the new commit | ||
* @returns {Promise<string>} the new commit SHA | ||
*/ | ||
export async function createCommit( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was moved to a separate module for ease of mocking.
@@ -53,6 +56,15 @@ export function generateTreeObjects(changes: Changes): TreeObject[] { | |||
return tree; | |||
} | |||
|
|||
function* inGroupsOf<T>( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the use of the generator.
nit: since it's only used in one place, I wonder if it's a premature abstraction, might just have gone with function *commitBatch
.
🤖 I have created a release *beep* *boop* --- ## [4.1.0](v4.0.1...v4.1.0) (2022-08-24) ### Features * group commit files into batches ([#398](#398)) ([e3815d5](e3815d5)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
Provides a new option for
filesPerCommit
which defaults to 100. If there are more than this limit,code-suggester
will split into groups of files and make multiple commits. For most use cases, this is a no-op. For larger monorepos, you may see multiple commits.Fixes #397
Ran the following command:
with a few test files in my working directory to create: #401 which has multiple commits.